var fs = require('fs');
 var Inotify = require('../node_modules/inotify').Inotify;
 var inotify = new Inotify();
 var watcher = {
 path: '.',
 watch_for: Inotify.IN_OPEN | Inotify.IN_CLOSE,
 callback: function (event) {
 var file = event.name ? event.name : '';
 var mask = event.mask;
 if (file != '' && file.indexOf('.') !== 0) {
    if (mask & Inotify.IN_OPEN) {
    console.log(file + ' was opened ');
 }
 else if (mask & Inotify.IN_CLOSE) {
    console.log(file + ' was closed ');
 }
 }
 }
 };
inotify.addWatch(watcher);
